package com.gy.edu.mine;

import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.gy.edu.R;
import com.gy.edu.base.BaseActivity;

/**
 * 作者：gy on 16/12/22
 * 说明：修改密码
 */
public class ChangePwdActivity extends BaseActivity {

    private EditText etOld,etNew,etConfig;
    private Button btnSave;

    @Override
    protected void initView() {
        setContentViewRes(R.layout.activity_change_pwd);
        setTitleMsg("修改密码");
        etOld = (EditText) findViewById(R.id.change_pwd_et_old);
        etNew = (EditText) findViewById(R.id.change_pwd_et_new);
        etConfig = (EditText) findViewById(R.id.change_pwd_et_config);
        btnSave = (Button) findViewById(R.id.change_pwd_btn_save);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void setListener() {
        super.setListener();
        btnSave.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
        if(v.getId() == R.id.change_pwd_btn_save){
            String strNew = etNew.getText().toString().trim();
            String strOld = etOld.getText().toString().trim();
            String strConfig = etConfig.getText().toString().trim();
            if(TextUtils.isEmpty(strNew)){
                showToast("请输入原密码");
            } else if(TextUtils.isEmpty(strOld)){
                showToast("新密码不可为空");
            } else if(TextUtils.isEmpty(strConfig)){
                showToast("请再次输入密码");
            } else {

            }
        }
    }
}
